Field of the Invention
The present invention relates to an image processing apparatus such as an image reading apparatus.
Description of the Related Art
In general, an image reading apparatus includes an ADF (Auto Document Feeder) which automatically feeds source documents set on a document table in turn one by one to its reading position. The ADF automatically feeds source documents one by one from a feed port. The image reading apparatus (to be referred to as a scanner hereinafter) optically reads a source document line by line using a line image sensor, and outputs the read document as image data. At an upper end of an output image, an image of a line which is read first is allocated. An image of the next read line is allocated at a second position from the upper end. In this manner, respective line images are allocated in the order they are read in turn from the upper end of the output image. For this reason, as the output image from the scanner, a different image is formed depending on whether the upper or lower end of a source document is directed to the feed port. For example, when the upper end of a source document is directed to the feed port (to be referred to as “reading a source document from the upper end” hereinafter), the upper end of the source document is allocated at the upper end of an image to be output. On the other hand, when the lower end of a source document is directed to the feed port (to be referred to as “reading a source document from the lower end” hereinafter), the lower end of the source document is allocated at the upper end of an image to be output. Therefore, an output image obtained when the source document is read from the lower end is an image obtained by rotating, through 180°, an output image obtained when the source document is read from the upper end.
However, when a different output image is formed depending on a set direction of a source document, the visibility of the image drops. For example, in case of a source document on which characters are written, it is difficult for the user to read characters from a 180°-rotated output image. In order to prevent such visibility drop, PTL 1 has proposed a technique which aligns directions of a plurality of output images by rotating an output image through 180° when source documents are set to be vertically flipped.    PLT 1: Japanese Patent Laid-Open No. 2001-251494